#include <iostream>
#include <string>
#include <vector>
#include <boost/algorithm/string.hpp>

int main()
{
    std::string str = "hello,,world;boost||example";
    std::vector<std::string> parts;

    // 以逗号、分号、竖线为分隔符，并压缩连续分隔符
    boost::split(parts, str, boost::is_any_of(",;|"), boost::token_compress_on);
    for (auto &v : parts)
    {
        std::cout << v << std::endl;
    }
    // 结果: hello world boost example
    return 0;
}